<template>
<h3>{{testdata}}</h3>
<!-- <h3>{{data}}</h3> -->

</template>

<script>
// import {mapGetters} from 'vuex'

export default {
  data () {
    return {
      testdata: this.$store.getters
    }
  },
  methods: {
    getDataVuex () {
      this.$store.dispatch('submitLogin').then(res => {
        console.log(this.$store.getters)
        this.testdata = this.$store.getters
      })
    },
    getDataVuex1 () {
      this.$store.dispatch('getTodos')
      console.log(this.$store.getters)
    }
  }

  // computed: mapGetters({data: 'getdata'})

}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
